/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.siteEncheres.client;


import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.History;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.TextBox;

/**
 *
 * @author Damador
 */
class IhmChercherCateg extends Composite {

    TextBox textBox = new TextBox();
    
    public IhmChercherCateg() {
        
        HorizontalPanel horizontalPanel = new HorizontalPanel();
        horizontalPanel.setStyleName("ihmChercherCateg");
        horizontalPanel.setSpacing(10);
        initWidget(horizontalPanel);
        horizontalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
        
        horizontalPanel.setSize("100%", "100%");
        
        Label labelRecherche = new Label("Recherche d'un produit :");
        labelRecherche.setWidth("150px");
        horizontalPanel.add(labelRecherche);
        
        horizontalPanel.add(textBox);
        
        //ListBox comboBox = new ListBox();
        //comboBox.setWidth("130px");
        //horizontalPanel.add(comboBox);
        
        Button btnNewButton = new Button("Rechercher");
        horizontalPanel.add(btnNewButton);
        
        btnNewButton.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                History.newItem("lister_seances?" + textBox.getText());
            }
        });
    }
}
    

